<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
        
    <div class="container">
                    <div class="navbar">
                      <div class="navbar-inner">
                        <div class="container">
                        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                         <span class="icon-bar"></span>
                         <span class="icon-bar"></span>
                         <span class="icon-bar"></span>
                         <a href="faces/index.xhtml" class="brand"><img src="img/suilib/logo_peque.png"/></a>
                        </a>
                        <h:form>
                        <div class="nav-collapse">
                           <ul class="nav">   
                            <h:form>
                                 <li class="active pull-right"><h:commandLink value="Inicio" action="#{indexMB.redirect()}"/></li>
                            </h:form>
                           
                            <!--<li class="active pull-right"><a href="#"><i class="icon-home icon-white"></i> Inicio</a></li>-->
                            <li><a class="pull-right" href="#"><i class="icon-envelope icon-white"></i>Contáctenos</a></li>
                            <li><a class="pull-right" href="#"><i class="icon-inbox icon-white"></i>¿Quiénes Somos?</a></li>
                            <li><a class="pull-right" href="#"><i class="icon-list icon-white"></i>Categorías</a></li>
                            <li><a class="pull-right" href="#"><i class="icon-list icon-white"></i>Universidades</a></li>
                            <c:choose>
                                <c:when test="#{!loginFormMB.logued}">
                                    <li><a data-toggle="modal" href="#login-modal"><i class="icon-ok-sign icon-white"/>Login</a></li>
                               </c:when>
                                <c:otherwise>
                                    <li><h:commandLink class="pull-right" action="#{loginFormMB.logout()}" value="Salir"/></li>
                                </c:otherwise>
                            </c:choose>
                          </ul>
                        </div><!-- /.nav-collapse -->
                        </h:form>
                      </div> <!--/.container -->
                    </div><!-- /.navbar-inner -->
                </div><!-- /.navbar -->
                 <c:choose>
                      <c:when test="#{!loginFormMB.logued}">
                         <div class="pull-right">
                            <h:form class="form-search">
                              <div class="input-append">
                                    <h:inputText value="#{searchMB.query}" class="span2 search-query"/>
                                    <h:commandButton value="Búsqueda" action="#{searchMB.searchBar()}" class="btn"/>
                              </div>
                            </h:form>
                        </div>
                      </c:when>           
                </c:choose>
                
    </div><!--Container -->
    <div id="login-modal" class="modal hide fade">
        <div class="modal-login">
              <a class="close" data-dismiss="modal">&times;</a>
              <h1><img src="img/suilib/logo_peque.png"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bienvenido!</h1>
         </div>   
         <div class="span5" style="margin-left:80px">
             <h:form>
               <br/>
               <div class="control-group"> 
                   Usuario:<br/>
                   <h:inputText class="span5" id="inputUsername" value="#{loginFormMB.username}"/>
               </div>
               <div class="control-group">
                   Contraseña:<br/>
                   <h:inputSecret class="span5" id="inputPassword" value="#{loginFormMB.password}"/>
               </div>               
                    <label>&nbsp;¿Olvidaste tu contraseña?</label><br/>
                    &nbsp;<h:commandButton class="btn btn-info" value="Entrar" action="#{loginFormMB.login}"/>
                    <button class="btn" data-dismiss="modal">Cerrar</button>
              </h:form>
             <br/>
         </div>
        <br/>
    </div>
</html>

